package com.yue92.datalife.controller.v1;

import com.yue92.datalife.helper.MomentHelper;
import com.yue92.datalife.response.MomentRes;
import com.yue92.datalife.response.ResponseResource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/api/v1/moments", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public class MomentController {

    @Autowired
    private MomentHelper momentHelper;

    @GetMapping("")
    public ResponseResource<MomentRes> index() {

        return ResponseResource.success(momentHelper.index());
    }

}
